package com.sqx.modules.sign.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sqx.common.utils.Result;
import com.sqx.modules.sign.dao.GoldRecordsDao;
import com.sqx.modules.sign.entity.GoldRecords;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description：TODO
 * @author： qiao
 * @create： 2025/1/17 15:14
 */
@RestController
@RequestMapping("/admin/GoldRecords")
@Api(value = "金币记录明细---管理端", tags = {"金币记录明细---管理端"})
public class GoldRecordsController {

    @Autowired
    private GoldRecordsDao goldRecordsDao;
    @GetMapping("/goldRecordsList")
    @ApiOperation("金币记录明细列表")
    public Result goldRecordsList(Integer page, Integer limit, GoldRecords goldRecords){
        Page<GoldRecords> pages;
        if (page != null && limit != null){
            pages = new Page<>(page, limit);
        }else {
            pages = new Page<>();
            pages.setSize(-1);
        }
        return Result.success().put("data",goldRecordsDao.selectPageByAllList(pages,goldRecords));
    }
}
